<template>
  <div>
    <el-row :gutter="20" style="margin:5px 120px 5px 120px;">
      <el-col :span="18">
        <div class="neirongDiv">
          <h2>{{data.title}}</h2>
          <div v-html="this.data.content">{{data.content}}</div>
        </div>
      </el-col>
      <el-col :span="6">
        <div class="neirongDiv">
          <h2>{{data.title}}</h2>
          <span>{{data.title}}</span>
        </div>
      </el-col>
    </el-row>
  </div>
</template>
<script>
export default {
  name: "content",
  data() {
    return {
      data: {}
    };
  },
  methods: {
  },
  mounted() {
    const id = this.$route.query.id;
    this.$axios
      .get("/api/data/" + id)
      .then(res => {
        console.log(res);
        this.data = res.data;
      })
      .catch(err => {
        console.log(err);
      });
  }
};
</script>
<style>
.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 300px;
  margin: 0;
}
.el-carousel {
  padding: 15px 120px;
  margin-top: 10px;
  background-color: #ffffff;
  margin-bottom: 10px;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
.grid-content {
  border-radius: 5px;
  min-height: 36px;
}
.neirongDiv {
  background-color: #ffffff;
  min-height: 600px;
  border-radius: 5px;
  /* text-align: center; */
  padding: 10px;
}
h2 {
  text-align: center;
}
</style>

